package com.yeyks.account.utils;


import com.yeyks.account.dal.domain.AccountInfo;

/**
 * @program: admin
 * @description:
 * @author: chenzheng
 * @create: 2019-06-06 19:43
 **/
public class AccountUtil {
    /**
     * 登录用户获取id ,子账户则获取部门经理id
     *
     * @param accountInfo
     * @return
     */
    public static Integer getOperationUserId(AccountInfo accountInfo) {
        Integer operationUserId = accountInfo.getId();
        if (null != accountInfo.getManagerId()) {
            operationUserId = accountInfo.getManagerId();
        }
        return operationUserId;
    }

//    public  static Long getOperationUserId(AccountInfo AccountInfo)
//    {
//        Long operationUserId = AccountInfo.getId();
//        if(null!=AccountInfo.getManagerId())
//        {
//            operationUserId = AccountInfo.getManagerId();
//        }
//        return  operationUserId;
//    }
}
